import Vue from "vue";
import VueRouter from "vue-router";
// import Android from "../views/Android";
import DetailPage from "../views/DetailPage";
import Flutter from "../views/Flutter";
import IOS from "../views/IOS";
import Recommend from "../views/Recommend";
import Sister from "../views/Sister";

Vue.use(VueRouter);

const routes = [
  {
    path: "/android",
    name: "Android",
    component: () => import("@/views/Android"),
  },
  {
    path: "/flutter",
    name: "Flutter",
    component: Flutter,
  },
  {
    path: "/ios",
    name: "IOS",
    component: IOS,
  },
  {
    path: "/recommend",
    name: "Recommend",
    component: Recommend,
  },
  {
    path: "/sister",
    name: "Sister",
    component: Sister,
  },
  {
    path: "/detail-page",
    name: "DetailPage",
    component: DetailPage,
  },
  {
    path: "/sister",
    redirect: {
      name: "/sister",
    },
    // redirect: "/sister",
  },
  // {
  //   path: "/",
  //   name: "Home",
  //   component: Home,
  // },
  // {
  //   path: "/about",
  //   name: "About",
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () =>
  //     import(/* webpackChunkName: "about" */ "../views/About.vue"),
  // },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
